import Request from "./request";
/**
 * 银行卡列表
 * @param {*} data
 * @returns
 */
export function bankList(data) {
  return Request({
    url: "/api/bank/list",
    data,
    method: "get",
  });
}
/**
 * 添加银行卡
 * @param {*} data
 * @returns
 */
export function bankAdd({ realName, idCard, bankName, bankNo, bankAddress }) {
  return Request({
    url: "/api/bank/add",
    data: {
      realName,
      idCard,
      bankName,
      bankNo,
      bankAddress,
    },
    method: "get",
  });
}
/**
 * 修改或删除银行卡
 * @param {*} data
 * @returns
 */
export function bankEdit({ realName, idCard, bankName, bankNo, id, status, bankAddress }) {
  return Request({
    url: "/api/bank/edit",
    data: {
      realName,
      idCard,
      bankName,
      bankNo,
      id,
      status,
      bankAddress,
    },
    method: "get",
  });
}

export function updateUserDataAPI(data) {
  return Request({
    url: "/api/user/updateData",
    data,
    method: "post",
  });
}
